Reproduction Files ReadMe

Cameron Wimpy | Laron K. Williams | Guy D. Whitten

9-6-2019

This folder contains all of the files needed to run the simulations, replicate the empirical results and create the figures in Cameron Wimpy, Laron K. Williams and Guy D. Whitten, “X Marks the Spot: Unlocking the Treasure of Spatial-X Models.” Journal of Politics.

If you have questions about the reproduction files please contact Laron Williams at williamslaro@missouri.edu.

Software and programs

These files require both Stata and R.

In Stata, you will need the spatwmat package found by running this code in Stata:

net install sg162, from("http://www.stata.com/stb/stb60")

In R, you will need to load (and potentially install from CRAN) the following packages:

Reproduction

The folder contains the following files and structure:

  1. Application folder containing the reproduction materials for the military spending illustration:

    • Data subfolder contains the following:

      • Shapefiles used to reproduce the illustrative map in the Supplementary Materials document (Figure 1)
      • Stata script file to reproduce the weights matrices (Generate Weights Matrices.do) for the SAR (SAR subfolder) and SAR (SAR subfolder) models.
      • Stata datasets used to estimate the models AND used to generate the weights matrices (Military Spending--Dyadic.dta, Military Spending--Monadic.dta, and Military Spending--Monadic--SLX.dta)
    • Results subfolder contains the following:

      • Stata script file to replicate the empirical results (Military Spending Models.do)
      • Stata log file that contains a copy of the replicated empirical results (Military Spending--Results.smcl)
      • Substantive Effects folder contains a dataset (Europe War Illustration.dta) produced in the Military Spending Models.do file.
  2. Experiments folder containing the replication materials for the simulations based on three sets of data-generating processes: SAR, SEM and SLX:

    • Data subfolder contains a W subsubfolder which has the R script file (Generate Higher-Order Weights Matrices.R) that produces the various weights matrices used in the simulations.
    • Generate subfolder contains subfolders for each of the three data-generating processes; in each subsubfolder, we include the code to run the simulations (e.g., SAR Monte Carlo Experiments.do), the dataset containing the simulations (e.g., SAR.dta), and any other necessary files (e.g., SAR--True Effects.dta)
    • Analyze subfolder contains subfolders for each of the three data-generating processes; in each subsubfolder, we include a Stata dataset containing the simulation results (e.g., Analyze SAR Monte Carlo Experiments.dta), a script file to summarize the results (Analyze Monte Carlo Experiments.do) and a Stata log file showing an exact copy of the summarized simulation results (Analyze SAR Monte Carlo Experiments.smcl).
    • Programs subfolder contains a Stata script file with a bunch of original programs to speed up the Monte Carlo simulations (SAR Programs.do)
  3. Figures folder contains a Stata dataset contains the following:

    • summaries of the Monte Carlo simulations (SLX.dta)
    • an R script file to produce Figures 2–4 in the manuscript (Generate WWW Figures.R)
  4. Survey folder contains the following:

    • Excel file containing the details of the survey (Spatial Census.xlsx)
    • Stata script file producing the patterns in the survey (Analyze Survey.do)
    • Stata log file contains a copy of the replicated patterns (Patterns in the Spatial Survey.smcl)